package lianxi;

import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.PrintStream;

public class _11_ {

	public static void main(String[] args) {
		try (FileReader fis1 = new FileReader("./src/lianxi/One.txt");
				FileReader fis2 = new FileReader("./src/lianxi/Two.txt");
				FileReader fis3 = new FileReader("./src/lianxi/Three.txt");) {
			System.setOut(new PrintStream(new FileOutputStream("D:\\a.txt")));
			int tmp = 0;
			while ((tmp = fis1.read()) != -1) {
				System.out.print((char) tmp);
			}
			System.out.print("\n");
			while ((tmp = fis2.read()) != -1) {
				System.out.print((char) tmp);

			}
			System.out.print("\n");

			while ((tmp = fis3.read()) != -1) {
				System.out.print((char) tmp);

			}
			System.out.print("\n");

		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
